<!--%import("./filter/delete_comment.xml")-->
<!--@if($oDocument->getCommentCount())-->
<hr class="hr" />
<div class="feedbackList" id="reply">
	<h3 class="feedbackHeader">
		<!--@if($grant->write_comment && $oDocument->allowComment()) -->
			{$lang->comment} <em>{$oDocument->getCommentcount()}</em>
		<!--@end-->
	</h3>
	<div class="replyList">
		{@
		   $_comment_list = $oDocument->getComments();
		   $oMemberModel = &getModel('member');
		   $memberConfig = $oMemberModel->getMemberConfig();
		}
		<!--@foreach($_comment_list as $key => $comment)-->

		<div class="item sec_lst_msg indent " <!--@if($comment->get('depth'))--> style="margin-left:{($comment->get('depth'))*15}px" <!--@end-->>
			{@ $counti++;}
			<div class="msg <!--@if(count($_comment_list) == $counti)-->msg_last<!--@end-->" style="margin-left:15px">
                <div class="img_profile" >
                    {@ $memberImage = $oMemberModel->getProfileImage($comment->member_srl);}
                    <img cond="$memberConfig->profile_image == 'Y' && $memberImage" width="63" height="63" alt="profile image" src="{$memberImage->src}"/>
                    <!--@if(!($memberImage) || ($memberConfig->profile_image != 'Y'))-->
                    <img src="./img/default_member.gif" width="63" height="63"/>
                    <!--@end-->
                </div>
                <div class="right">
					<!--@if(!$comment->member_srl)-->
						<!--@if($comment->homepage)-->
							<span class="msg_author"><a href="{$comment->homepage}" onclick="window.open(this.href);return false;">{$comment->getNickName()}</a></span>
						<!--@else-->
							<span class="msg_author">{$comment->getNickName()}</span>
						<!--@end-->
					<!--@else-->
						<span class="msg_author"><a href="#popup_menu_area" class="member_{$comment->member_srl}" onclick="return false">{$comment->getNickName()}</a></span>
					<!--@end-->
					<span class="com_content">{$comment->getContent(false)}</span>
					<!--@if(!$comment->isAccessible())-->
						<form action="./" method="get" onsubmit="return procFilter(this, input_password)" class="secretMessage">
						<input type="hidden" name="mid" value="{$mid}" />
						<input type="hidden" name="page" value="{$page}" />
						<input type="hidden" name="document_srl" value="{$comment->get('document_srl')}" />
						<input type="hidden" name="comment_srl" value="{$comment->get('comment_srl')}" />
							<p>&quot;{$lang->msg_is_secret}&quot;</p>
							<dl>
								<dt><label for="cpw">{$lang->password}</label> :</dt>
								<dd><input type="password" id="cpw" name="password" class="inputText" /><span class="buttonOfficial"><input type="submit" value="{$lang->cmd_input}" /></span></dd>
							</dl>
						</form>
					<!--@else-->
					<!--@if($comment->hasUploadedFIles())-->
					<dl class="attachedFile">
						<dt><img src="./img/common/iconFiles.gif" width="27" height="11" alt="{$lang->uploaded_file}" /> <button type="button" class="fileToggle" onclick="jQuery(this).parents('dl.attachedFile').toggleClass('open');return false;">{$lang->uploaded_file} ({$comment->get('uploaded_count')})</button></dt>
						<dd>
							<ul class="files">
								{@ $_uploaded_files = $comment->getUploadedFiles() }
								<!--@foreach($_uploaded_files as $key => $file)-->
								<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} <span class="bubble">[File Size:{FileHandler::filesize($file->file_size)}/Download{number_format($file->download_count)}]</span></a></li>
								<!--@end-->
							</ul>
						</dd>
					</dl>
					<!--@end-->
					<span class="msg_date">{$comment->getRegdate('Y.m.d')} {$comment->getRegdate('H:i:s')}</span>
					<ul class="option">
					<!--@if($is_logged)-->
						<li class="wouldYou"><a href="#popup_menu_area" class="comment_{$comment->comment_srl}">{$lang->cmd_comment_do}</a></li>
					<!--@end-->
						<li><a href="{getUrl('act','dispWikiReplyComment','comment_srl',$comment->comment_srl)}">{$lang->cmd_reply}</a></li>
					<!--@if($comment->isGranted() || !$comment->get('member_srl'))-->
						<li><a href="{getUrl('act','dispWikiModifyComment','comment_srl',$comment->comment_srl)}">{$lang->cmd_modify}</a></li>
						<li><a href="#" onclick="toDeleteItem({$comment->comment_srl});return false;">{$lang->cmd_delete}</a></li>
					<!--@end-->
					</ul>
					<!--@end-->
                    <div class="bottom">
                        <div id="697_re" class="pull_right reAction"></div>
                    </div><!-- //bottom -->
                </div><!-- //right -->
            </div>


		</div>
		<!--@end-->

</div>
    <!--@if($oDocument->comment_page_navigation)-->
    <div class="pagination">
        <a href="{getUrl('cpage',1)}#comment" class="prevEnd">{$lang->first_page}</a>
        <!--@while($page_no = $oDocument->comment_page_navigation->getNextPage())-->
            <!--@if($cpage == $page_no)-->
                <strong>{$page_no}</strong>
            <!--@else-->
                <a href="{getUrl('cpage',$page_no)}#comment">{$page_no}</a>
            <!--@end-->
        <!--@end-->
        <a href="{getUrl('cpage',$oDocument->comment_page_navigation->last_page)}#comment" class="nextEnd">{$lang->last_page}</a>
    </div>
    <!--@end-->
</div>
<!--@end-->
<script>
    function toDeleteItem(srl)
    {
        jQuery('#del_commentWin').show();
        jQuery('.loginLayer form ').show();
        jQuery('#del_comment_srl').val(srl);
        return false;
    }
</script>

<div class="loginWindow" id="del_commentWin">
    <span class="modalWindow"></span>
    <div class="loginLayer loginTypeA" id="loginLayer">
        <button accesskey="X" onclick="document.getElementById('del_commentWin').style.display='none'" class="close" type="button"><span>Close</span></button>
        <h3 style="text-align:center">{$lang->confirm_delete}</h3>
        <form action="./" method="get" onsubmit="return procFilter(this, delete_comment)">
        	<input type="hidden" name="mid" value="{$mid}" />
        	<input type="hidden" name="page" value="{$page}" />
        	<input type="hidden" name="document_srl" value="{$oDocument->get('document_srl')}" />
        	<input type="hidden" name="comment_srl" value="" id="del_comment_srl"/>
        	<div class="inputPassword" style="text-align:center;margin-top:10px">
        		<span class="btn"><input type="submit" value="{$lang->cmd_delete}" accesskey="s" /></span>
        		<a href="#" onclick="document.getElementById('del_commentWin').style.display='none';return false;" class="btn"><span>{$lang->cmd_cancel}</span></a>
        	</div>
        </form>

    </div>
</div>